# 1.设置最低cmake版本
cmake_minimum_required(VERSION 3.18)

#2.设置项目名称
project(InstallHello
    VERSION 1.2.3
    LANGUAGES C C++)

#3.添加安装目标
add_executable(hello main.cpp)


#4.安装到本地
include(GNUInstallDirs)
install(TARGETS hello)


# message--printf
message(STATUS "PROJECT_NAME: ${PROJECT_NAME}")

#打印版本信息
messsage(STATUS "PROJECT_VERSION:${PROJECT_VERSION}")
message(STATUS "PROJECT_VERSION_MAJOR:${PROJECT_VERSION_MAJOR}")